{% extends 'base.html' %}
{% block body %}




        <div class="tabbable"> <!-- Only required for left/right tabs -->
      <ul class="nav nav-tabs">
        <li class="active"><a href="#tab1" data-toggle="tab">公告</a></li>
        <li><a href="#tab2" data-toggle="tab">新闻</a></li>
          <li><a href="#tab3" data-toggle="tab">学术</a></li>
      </ul>
      <div class="tab-content">
        <div class="tab-pane active" id="tab1">
            <ul style="list-style: none">
                {% for a in list %}
                    {% if a.state == 1 and a.types.id == 1 and a.power == 1 %}
                        <li>
                            <h3>标题:{{ a.title }}</h3>
	                        <h4>预览:{{ a.content }}</h4>
                            <a href='/information/look/{{ a.id }}'><button>查看</button></a>
                            <a href='/information/change/{{a.id}}'><button type='submit'>修改</button></a>
                            <button type='button' onclick=q({{a.id}})>删除</button><br>
                        </li>
                    {% endif %}
                {% endfor %}
            </ul>
        </div>
        <div class="tab-pane" id="tab2">
          <ul style="list-style: none">
                {% for a in list %}
                    {% if a.state == 1 and a.types.id == 2 and a.power == 1 %}
                        <li>
                            <h3>标题:{{ a.title }}</h3>
	                        <h4>预览:{{ a.content }}</h4>
                            <a href='/information/look/{{ a.id }}'><button>查看</button></a>
                            <a href='/information/change/{{a.id}}'><button type='submit'>修改</button></a>
                            <button type='button' onclick=q({{a.id}})>删除</button><br>
                        </li>
                    {% endif %}
                {% endfor %}
            </ul>
        </div>
          <div class="tab-pane" id="tab3">
          <ul style="list-style: none">
                {% for a in list %}
                    {% if a.state == 1 and a.types.id == 3 and a.power == 1 %}
                        <li>
                            <h3>标题:{{ a.title }}</h3>
	                        <h4>预览:{{ a.content }}</h4>
                            <a href='/information/look/{{ a.id }}'><button>查看</button></a>
                            <a href='/information/change/{{a.id}}'><button type='submit'>修改</button></a>
                            <button type='button' onclick=q({{a.id}})>删除</button><br>
                        </li>
                    {% endif %}
                {% endfor %}
            </ul>
        </div>
      </div>
    </div>






<script>
    function q(id){
		t=confirm('确定吗')
		if(t){
			location.href='/information/del_handler/'+id
		}
	}
</script>
{% endblock %}
